package http

import (
	"github.com/gogf/gf/net/ghttp"
)

// HttpGet get请求
func HttpGet(url,parameter string) (string,error) {
	var (
		urls string
		e error
		res string
		)
	if parameter == "" {
		urls = url
	} else  {
		urls = url + "?" + parameter
	}
	if r, err := ghttp.Get(urls); e != nil {
		e = err
	} else {
		defer r.Close()
		res = r.ReadAllString()
	}
	return res,e
}



